int r_down_flag = 0;//右下拐点标志
	int r_up_flag = 0;//右上拐点标志
	int l_down_flag = 0;//左下拐点标志
	int l_up_flag = 0;//左上拐点标志
	int l_xie_crossroad_jin = 0;//近左斜标志
	int r_xie_crossroad_jin = 0;//近右斜标志
	int straightway = 0;//直道标志
	int before_crossroad = 0;//正十字前标志
	int ing_crossroad = 0;//正十字中标志
	int l_xie_crossroad_yuan = 0;//远左斜标志
	int r_xie_crossroad_yuan = 0;//远右斜标志
	int ing_crossroad_pd = 0;//正十字中与弯道离奇拐点、远斜十字判别标志
	for (i = 0; i < 20; i++)
	{
		if (g_VideoImageData[i][0] > IMAGE_MIDDLE && g_VideoImageData[i][161] > IMAGE_MIDDLE)
		{
			ing_crossroad_pd++;
		}
	}
	for (i = 5; i < 50; i++)//判断上面拐点类型
	{
		if (g_RightEdge[i].y - g_RightEdge[i + 1].y < 5 && g_RightEdge[i - 1].y - g_RightEdge[i].y > 5 && g_RightEdge[i - 2].y - g_RightEdge[i].y > 10 && g_LeftEdge[i - 10].y < 20)
		{
			r_up_flag = 1;
			g_RightUp_x = i;
			g_RightUp_y = g_RightEdge[i].y;
			//break;
			/*printf("%d\n",2);*/
		}
		if (g_LeftEdge[i + 1].y - g_LeftEdge[i].y < 5 && g_LeftEdge[i].y - g_LeftEdge[i - 1].y > 5 && g_LeftEdge[i].y - g_LeftEdge[i - 2].y > 10 && g_RightEdge[i - 10].y > 140)
		{
			l_up_flag = 1;
			g_LeftUp_x = i;
			g_LeftUp_y = g_LeftEdge[i].y;
			//break;
			/*printf("%d\n",4);*/
		}
	}
	for (i = 7; i < 40; i++)//判断下面拐点类型
	{
		if (g_RightEdge[i + 1].y - g_RightEdge[i].y > 5 && g_RightEdge[i + 2].y - g_RightEdge[i].y > 10 && g_RightEdge[i - 1].y - g_RightEdge[i].y < 5 && g_RightEdge[i - 4].y - g_RightEdge[i].y >= 0)
		{
			r_down_flag = 1;
			g_RightDown_x = i;
			g_RightDown_y = g_RightEdge[i].y;
			//break;
			/*printf("%d\n",1);*/
		}
		if (g_LeftEdge[i].y - g_LeftEdge[i + 1].y > 5 && g_LeftEdge[i].y - g_LeftEdge[i + 2].y > 10 && g_LeftEdge[i].y - g_LeftEdge[i - 1].y < 5 && g_LeftEdge[i].y - g_LeftEdge[i - 4].y >= 0)
		{
			l_down_flag = 1;
			g_LeftDown_x = i;
			g_LeftDown_y = g_LeftEdge[i].y;
			/*if (g_LeftDown_y > 81)
			{
				l_down_flag = 0;
			}*/
		}
	}
	if (r_down_flag == 1 && r_up_flag == 1 && l_down_flag == 0 && l_up_flag == 0)
	{
		l_xie_crossroad_jin = 1;
	}
	else if (r_down_flag == 0 && r_up_flag == 0 && l_down_flag == 1 && l_up_flag == 1)
	{
		r_xie_crossroad_jin = 1;
	}
	else if (r_down_flag == 1 && r_up_flag == 1 && l_down_flag == 1 && l_up_flag == 1)
	{
		before_crossroad = 1;
	}
	else if (r_down_flag == 0 && r_up_flag == 1 && l_down_flag == 0 && l_up_flag == 1 && ing_crossroad_pd > 10)
	{
		ing_crossroad = 1;
	}
	else
	{
		r_down_flag = 0, r_up_flag = 0, l_down_flag = 0, l_up_flag = 0;
	}


	if (r_down_flag == 0 && r_up_flag == 0 && l_down_flag == 0 && l_up_flag == 0 && l_xie_crossroad_jin == 0 && r_xie_crossroad_jin == 0)//远斜十字拐点判别
	{
		for (i = 0; i < 55; i++)
		{
			if (g_LeftEdge[i + 1].y == 0 && g_RightEdge[i - 1].y > g_RightEdge[i + 1].y && g_RightEdge[i + 2].y > g_RightEdge[i + 1].y && g_RightEdge[i + 1].y < 155 && g_RightEdge[i - 1].y < 155 && g_RightEdge[i + 2].y < 155)
			{
				r_down_flag = 1;
				g_RightDown_x = i + 1;
				g_RightDown_y = g_RightEdge[i + 1].y;
			}
			if (g_LeftEdge[i].y == 0 && g_LeftEdge[i + 1].y == 0 && g_LeftEdge[i + 2].y != 0 && g_LeftEdge[i + 3].y != 0 && g_LeftEdge[i + 2].y > 10)
			{
				r_up_flag = 1;
				g_RightUp_x = i + 2;
				g_RightUp_y = g_LeftEdge[i + 2].y;
			}
			if (g_RightEdge[i + 1].y == 161 && g_LeftEdge[i - 1].y < g_LeftEdge[i + 1].y && g_LeftEdge[i + 2].y < g_LeftEdge[i + 1].y && g_LeftEdge[i + 1].y > 5 && g_LeftEdge[i - 1].y > 5 && g_LeftEdge[i + 2].y > 5)
			{
				l_down_flag = 1;
				g_LeftDown_x = i + 1;
				g_LeftDown_y = g_LeftEdge[i + 1].y;
			}
			if (g_RightEdge[i].y == 161 && g_RightEdge[i + 1].y == 161 && g_RightEdge[i + 2].y != 161 && g_RightEdge[i + 3].y != 161 && g_RightEdge[i + 2].y < 151)
			{
				l_up_flag = 1;
				g_LeftUp_x = i + 2;
				g_LeftUp_y = g_RightEdge[i + 2].y;
			}
		}

	}

	int x_d = 0, x_u = 0;
	int r_turn_pd = 0;
	int l_turn_pd = 0;
	int r_near_turn = 0;//右近弯标志
	int r_far_turn = 0;//右远弯标志
	int l_near_turn = 0;//左近弯标志
	int l_far_turn = 0;//左远弯标志
	int r_turn_fuzhu = 0;
	int l_turn_fuzhu = 0;
	for (i = 0; i < 60; i++)
	{
		if (g_LeftEdge[i].y == 0 && g_RightEdge[i].y < 161 && g_RightEdge[i].y < g_RightEdge[i - 1].y)
		{
			l_turn_pd++;
		}
		if (g_RightEdge[i].y == 161 && g_LeftEdge[i].y > 0 && g_LeftEdge[i].y > g_LeftEdge[i - 1].y)
		{
			r_turn_pd++;
		}
		if (g_LeftEdge[i].y == 0)
		{
			l_turn_fuzhu++;
		}
		if (g_RightEdge[i].y == 161)
		{
			r_turn_fuzhu++;
		}
	}
	if (l_turn_pd > 30 && g_VideoImageData[l_turn_pd][100] < IMAGE_MIDDLE/*&& r_turn_fuzhu < 10*/)
	{
		l_near_turn = 1;
	}
	if (l_turn_pd > 10 && l_turn_pd < 30 && l_turn_fuzhu - l_turn_pd < 8)
	{
		l_far_turn = 1;
	}
	if (r_turn_pd > 30 && g_VideoImageData[r_turn_pd][60] < IMAGE_MIDDLE/*&& l_turn_fuzhu < 10*/)
	{
		r_near_turn = 1;
	}
	if (r_turn_pd > 10 && r_turn_pd < 30 && r_turn_fuzhu - r_turn_pd < 8)
	{
		r_far_turn = 1;
	}
	if (l_far_turn == 1 && r_far_turn == 1)
	{
		l_far_turn = 0;
		r_far_turn = 0;
	}


	if (l_far_turn == 1)
	{
		for (i = 20; i < 55; i++)
		{
			if (g_LeftEdge[i].y == 0 && g_LeftEdge[i - 1].y > 0)
			{
				x_d = i;
			}
			if (g_LeftEdge[i].y == 0 && g_LeftEdge[i + 1].y > 0)
			{
				x_u = i;
			}
		}
	}
	if (r_far_turn == 1)
	{
		for (i = 25; i < 55; i++)
		{
			if (g_RightEdge[i].y == 161 && g_RightEdge[i - 1].y < 161)
			{
				x_d = i;
			}
			if (g_RightEdge[i].y == 161 && g_RightEdge[i + 1].y < 161)
			{
				x_u = i;
			}
		}
		/*for (i = x_d; i < 55; i++)
		{
			if (g_RightEdge[i].y == 161 && g_RightEdge[i + 1].y < 161)
			{
				x_u = i;
			}
		}*/
	}
	if (x_d == 0 && x_u == 0)
	{
		l_far_turn = 0;
		r_far_turn = 0;
	}


	if (r_down_flag == 0 && r_up_flag == 0 && l_down_flag == 0 && l_up_flag == 0)
	{
		straightway = 1;
	}
	else if (r_down_flag == 1 && r_up_flag == 1 && l_down_flag == 0 && l_up_flag == 0 && l_xie_crossroad_jin == 0)
	{
		l_xie_crossroad_yuan = 1;
	}
	else if (r_down_flag == 0 && r_up_flag == 0 && l_down_flag == 1 && l_up_flag == 1 && r_xie_crossroad_jin == 0)
	{
		r_xie_crossroad_yuan = 1;
	}
	if (l_near_turn == 1 && l_xie_crossroad_jin == 1)
	{
		l_xie_crossroad_jin = 0;
	}
	if (r_near_turn == 1 && r_xie_crossroad_jin == 1)
	{
		r_xie_crossroad_jin = 0;
	}

	int l_ku = 0;
	int r_ku = 0;
	int l_ku_qian = 0;
	int l_ku_zhong = 0;
	int l_ku_hou = 0;
	int r_ku_qian = 0;
	int r_ku_zhong = 0;
	int r_ku_hou = 0;
	if (banma == 1)
	{
		l_down_flag = 0;
		l_up_flag = 0;
		r_down_flag = 0;
		r_up_flag = 0;
		int r_ku_pd = 0;
		int l_ku_pd = 0;
		for (i = 0; i < 60; i++)
		{
			if (g_LeftEdge[i].y == 0)
			{
				l_ku_pd++;
			}
			if (g_RightEdge[i].y == 161)
			{
				r_ku_pd++;
			}
		}
		if (l_ku_pd > r_ku_pd)
		{
			l_ku = 1;
		}
		else
		{
			r_ku = 1;
		}
		if (l_ku == 1)
		{
			for (i = 0; i < 30; i++)
			{
				if (g_LeftEdge[i - 1].y < g_LeftEdge[i + 1].y && g_LeftEdge[i + 2].y < g_LeftEdge[i + 1].y)
				{
					l_down_flag = 1;
					g_LeftDown_x = i + 1;
					g_LeftDown_y = g_LeftEdge[i + 1].y;
				}
			}
			for (i = 55; i > 35; i--)
			{
				if (g_LeftEdge[i + 1].y - g_LeftEdge[i].y < 5 && g_LeftEdge[i].y - g_LeftEdge[i - 1].y > 5)
				{
					l_up_flag = 1;
					g_LeftUp_x = i;
					g_LeftUp_y = g_LeftEdge[i].y;
				}
			}
			if (l_down_flag == 1 && l_up_flag == 1 && g_LeftDown_y < g_LeftUp_y)
			{
				l_ku_qian = 1;
			}
			if (l_ku_qian == 0 && l_up_flag == 1)
			{
				l_ku_zhong = 1;
			}
		}
		else if (r_ku == 1)
		{
			for (i = 0; i < 30; i++)
			{
				if (g_RightEdge[i - 1].y > g_RightEdge[i + 1].y && g_RightEdge[i + 2].y > g_RightEdge[i + 1].y)
				{
					r_down_flag = 1;
					g_RightDown_x = i + 1;
					g_RightDown_y = g_RightEdge[i + 1].y;
				}
			}
			for (i = 55; i > 38; i--)
			{
				if (g_RightEdge[i].y - g_RightEdge[i + 1].y < 3 && g_RightEdge[i - 1].y - g_RightEdge[i].y > 3)
				{
					r_up_flag = 1;
					g_RightUp_x = i;
					g_RightUp_y = g_RightEdge[i].y;
				}
			}
			if (r_down_flag == 1 && r_up_flag == 1 && g_RightUp_y < g_RightDown_y)
			{
				r_ku_qian = 1;
			}
			if (r_ku_qian == 0 && r_up_flag == 1)
			{
				r_ku_zhong = 1;
			}
		}
		r_near_turn = 0;
		l_near_turn = 0;
		r_far_turn = 0;
		l_far_turn = 0;
		r_xie_crossroad_yuan = 0;
		l_xie_crossroad_yuan = 0;
	}


	float b_r, k_r, b_l, k_l;//补线斜率和截距
	if (banma == 1)
	{
		g_CenterNum = g_RightEdgeNum;
			for (i = 0; i < g_RightEdgeNum; i++)
			{
				g_CenterPosition[i].x = g_RightEdge[i].x;
				g_CenterPosition[i].y = 81;
			}
	}
	else if (before_crossroad == 1)//正十字前中心求取
	{
		k_r = (g_RightUp_y - g_RightDown_y) / (g_RightUp_x - g_RightDown_x);
		b_r = g_RightDown_y - k_r * g_RightDown_x;
		for (i = g_RightDown_x; i < g_RightUp_x + 1; i++)
		{
			g_RightEdge[i].y = k_r * g_RightEdge[i].x + b_r;
		}
		k_l = (g_LeftUp_y - g_LeftDown_y) / (g_LeftUp_x - g_LeftDown_x);
		b_l = g_LeftDown_y - k_l * g_LeftDown_x;
		for (i = g_LeftDown_x; i < g_LeftUp_x + 1; i++)
		{
			g_LeftEdge[i].y = k_l * g_LeftEdge[i].x + b_l;
		}
		g_CenterNum = g_RightEdgeNum;
			for (i = 0; i < g_RightEdgeNum; i++)
			{
				g_CenterPosition[i].x = g_RightEdge[i].x;
				g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
			}
	}
	else if (ing_crossroad == 1)//正十字中中心求取
	{
		k_r = (g_RightUp_y - 161) / g_RightUp_x;
		b_r = 161;
		for (i = 0; i < g_RightUp_x + 1; i++)
		{
			g_RightEdge[i].y = k_r * g_RightEdge[i].x + b_r;
		}
		k_l = g_LeftUp_y / g_LeftUp_x;
		b_l = 0;
		for (i = 0; i < g_LeftUp_x + 1; i++)
		{
			g_LeftEdge[i].y = k_l * g_LeftEdge[i].x;
		}
		g_CenterNum = g_RightEdgeNum;
			for (i = 0; i < g_RightEdgeNum; i++)
			{
				g_CenterPosition[i].x = g_RightEdge[i].x;
				g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
			}
	}
	else if (l_xie_crossroad_jin == 1)//近左斜十字中心求取
	{
		k_r = (g_RightUp_y - g_RightDown_y) / (g_RightUp_x - g_RightDown_x);
		b_r = g_RightDown_y - k_r * g_RightDown_x;
		for (i = g_RightDown_x; i < g_RightUp_x + 1; i++)
		{
			g_RightEdge[i].y = k_r * g_RightEdge[i].x + b_r;
		}
		int left_create = g_RightUp_x;
		k_l = -k_r;
		b_l = g_LeftEdge[left_create].y - k_l * g_RightUp_x;
		for (i = left_create; i >= 0; i--)
		{
			g_LeftEdge[i].y = k_l * g_LeftEdge[i].x + b_l;
		}
		g_CenterNum = g_RightEdgeNum;
			for (i = 0; i < g_RightEdgeNum; i++)
			{
				g_CenterPosition[i].x = g_RightEdge[i].x;
				g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
			}
	}
	else if (r_xie_crossroad_jin == 1)//近右斜十字中心求取
	{
		k_l = (g_LeftUp_y - g_LeftDown_y) / (g_LeftUp_x - g_LeftDown_x);
		b_l = g_LeftDown_y - k_l * g_LeftDown_x;
		for (i = g_LeftDown_x; i < g_LeftUp_x + 1; i++)
		{
			g_LeftEdge[i].y = k_l * g_LeftEdge[i].x + b_l;
		}
		int right_create = g_LeftUp_x;
		k_r = -k_l;
		b_r = g_RightEdge[right_create].y - k_r * g_LeftUp_x;
		for (i = right_create; i >= 0; i--)
		{
			g_RightEdge[i].y = k_r * g_RightEdge[i].x + b_r;
		}
		g_CenterNum = g_RightEdgeNum;
			for (i = 0; i < g_RightEdgeNum; i++)
			{
				g_CenterPosition[i].x = g_RightEdge[i].x;
				g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
			}
	}
	else if (l_xie_crossroad_yuan == 1)//远左斜十字中心求取
	{
		k_r = (g_RightUp_y - g_RightDown_y) / (g_RightUp_x - g_RightDown_x);
		b_r = g_RightDown_y - k_r * g_RightDown_x;
		for (i = g_RightDown_x; i < g_RightUp_x + 1; i++)
		{
			g_RightEdge[i].y = k_r * g_RightEdge[i].x + b_r;
		}
		g_RightEdgeNum = g_RightUp_x;
		g_LeftEdgeNum = g_RightUp_x;
		g_CenterNum = g_RightEdgeNum;
			for (i = 0; i < g_RightEdgeNum; i++)
			{
				g_CenterPosition[i].x = g_RightEdge[i].x;
				g_CenterPosition[i].y = k_r * g_RightEdge[i].x + b_r / 2;
			}
	}
	else if (r_xie_crossroad_yuan == 1)//远右斜十字中心求取
	{
		k_l = (g_LeftUp_y - g_LeftDown_y) / (g_LeftUp_x - g_LeftDown_x);
		b_l = g_LeftDown_y - k_l * g_LeftDown_x;
		for (i = g_LeftDown_x; i < g_LeftUp_x + 1; i++)
		{
			g_LeftEdge[i].y = k_l * g_LeftEdge[i].x + b_l;
		}
		g_RightEdgeNum = g_LeftUp_x;
		g_LeftEdgeNum = g_LeftUp_x;
		g_CenterNum = g_RightEdgeNum;
			for (i = 0; i < g_RightEdgeNum; i++)
			{
				g_CenterPosition[i].x = g_LeftEdge[i].x;
				g_CenterPosition[i].y = k_l * g_LeftEdge[i].x + (161 - b_l) / 2;
			}
	}
	else if (l_near_turn == 1)//左近弯中心求取
	{
		int left_pinyi = g_RightEdge[0].y;
		for (i = 0; i <= l_turn_pd; i++)
		{
			g_LeftEdge[i].y = g_RightEdge[i].y - left_pinyi - 2 * i;
		}
		g_CenterNum = g_RightEdgeNum;
			for (i = 0; i < g_RightEdgeNum; i++)
			{
				g_CenterPosition[i].x = g_RightEdge[i].x;
				g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
			}
	}
	else if (r_near_turn == 1)//右近弯中心求取
	{
		int right_pinyi = 161 - g_LeftEdge[0].y;
		for (i = 0; i <= r_turn_pd; i++)
		{
			g_RightEdge[i].y = g_LeftEdge[i].y + right_pinyi + 2 * i;
		}
		g_CenterNum = g_RightEdgeNum;
			for (i = 0; i < g_RightEdgeNum; i++)
			{
				g_CenterPosition[i].x = g_RightEdge[i].x;
				g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
			}
	}
	else if (l_far_turn == 1)
	{
		g_CenterNum = g_RightEdgeNum;
		g_LeftEdgeNum = x_d;
			for (i = 0; i <= x_d; i++)
			{
				g_CenterPosition[i].x = g_RightEdge[i].x;
				g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
			}
		k_l = -2 * g_CenterPosition[x_d].y / (x_u - x_d);
		b_l = -k_l * (x_d + x_u) / 2;
		for (i = x_d; i <= g_RightEdgeNum/*(x_d + x_u) / 2*/; i++)
		{
			g_CenterPosition[i].x = i;
			g_CenterPosition[i].y = k_l * i + b_l;
		}
	}
	else if (r_far_turn == 1)
	{
		g_CenterNum = g_LeftEdgeNum;
		g_RightEdgeNum = x_d;
			for (i = 0; i <= x_d; i++)
			{
				g_CenterPosition[i].x = g_RightEdge[i].x;
				g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
			}
		k_r = 2 * (161 - g_CenterPosition[x_d].y) / (x_u - x_d);
		b_r = 161 - k_r * (x_d + x_u) / 2;
		for (i = x_d; i <= g_RightEdgeNum/*(x_d + x_u) / 2*/; i++)
		{
			g_CenterPosition[i].x = i;
			g_CenterPosition[i].y = k_r * i + b_r;
		}
	}
	//else if (l_ku_qian == 1)
	//{
	//	g_CenterNum = g_LeftUp_x;
	//	g_RightEdgeNum = g_LeftUp_x;
	//	g_LeftEdgeNum = g_LeftDown_x;
	//	DEBUG_VAR(g_CenterNum, d)
	//	int start = g_LeftDown_x;
	//	int end_x = (g_LeftDown_x + g_LeftUp_x) / 2;
	//	int end_y = (g_LeftDown_y + g_LeftUp_y) / 2;
	//	k_l = (g_RightEdge[start].y - g_LeftUp_y) / (start - g_LeftUp_x);
	//	b_l = g_LeftUp_y - k_l * g_LeftUp_x;
	//	for (i = start; i < g_LeftUp_x+1; i++)
	//	{
	//		g_RightEdge[i].y = k_l * i + b_l;
	//	}
	//	for (i = 0; i < start; i++)
	//	{
	//		g_CenterPosition[i].x = i;
	//		g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
	//	}
	//	for (i = start; i < g_LeftUp_x; i++)
	//	{
	//		g_CenterPosition[i].x = i;
	//		g_CenterPosition[i].y = (k_l-1) * i + b_l + 81 - g_RightEdge[start].y;
	//	}
	//	/*for (i = end_x; i < g_LeftUp_x; i++)
	//	{
	//		g_CenterPosition[i].x = i;
	//		g_CenterPosition[i].y =  -i + b_l + 81 - g_RightEdge[start].y;
	//	}*/
 //   }
	//else if (r_ku_qian == 1)
	//{
	//	g_CenterNum = g_RightUp_x;
	//	g_RightEdgeNum = g_RightDown_x;
	//	g_LeftEdgeNum = g_RightUp_x;
	//	DEBUG_VAR(g_CenterNum, d)
	//	int start = g_RightDown_x;
	//	//int end_x = (g_LeftDown_x + g_LeftUp_x) / 2;
	//	//int end_y = (g_LeftDown_y + g_LeftUp_y) / 2;
	//	k_r = (g_LeftEdge[start].y - g_RightUp_y) / (start - g_RightUp_x);
	//	b_r = g_RightUp_y - k_r * g_RightUp_x;
	//	for (i = start; i < g_RightUp_x + 1; i++)
	//	{
	//		g_LeftEdge[i].y = k_r * i + b_r;
	//	}
	//	for (i = 0; i < start; i++)
	//	{
	//		g_CenterPosition[i].x = i;
	//		g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
	//	}
	//	for (i = start; i < g_RightUp_x; i++)
	//	{
	//		g_CenterPosition[i].x = i;
	//		g_CenterPosition[i].y = (k_r + 1) * i + b_r + 81 - g_LeftEdge[start].y;
	//	}
	//}
	//else if (l_ku_zhong == 1)
	//{
	//	g_CenterNum = g_LeftUp_x;
	//	g_RightEdgeNum = g_LeftUp_x;
	//	g_LeftEdgeNum = g_LeftUp_x;
	//	DEBUG_VAR(g_CenterNum, d)
	//	k_l = (161 - g_LeftUp_y) / (-g_LeftUp_x);
	//	b_l = 161;
	//	for (i = 0; i < g_LeftUp_x; i++)
	//	{
	//		g_RightEdge[i].y = k_l * i + b_l;
	//		g_LeftEdge[i].y = k_l * i;
	//	}
	//	for (i = 0; i < g_LeftUp_x; i++)
	//	{
	//		g_CenterPosition[i].x = g_RightEdge[i].x;
	//		g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
	//	}
	//}
	//else if (r_ku_zhong == 1)
	//{
	//	g_CenterNum = g_RightUp_x;
	//	g_RightEdgeNum = g_RightUp_x;
	//	g_LeftEdgeNum = g_RightUp_x;
	//	DEBUG_VAR(g_CenterNum, d)
	//		k_r = g_RightUp_y / g_RightUp_x;
	//	for (i = 0; i < g_RightUp_x; i++)
	//	{
	//		g_LeftEdge[i].y = k_r * i;
	//		g_RightEdge[i].y = k_r * i + 161;
	//	}
	//	for (i = 0; i < g_RightUp_x; i++)
	//	{
	//		g_CenterPosition[i].x = g_RightEdge[i].x;
	//		g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
	//	}
	//}
	else
	{
		g_CenterNum = g_RightEdgeNum;
			for (i = 0; i < g_RightEdgeNum; i++)
			{
				g_CenterPosition[i].x = g_RightEdge[i].x;
				g_CenterPosition[i].y = (g_RightEdge[i].y + g_LeftEdge[i].y) / 2;
			}
	}